1
提示功能核心領域導論
AI010Lesson 2
00:00

提示技術的五大支柱

除了簡單的對話介面之外,大型語言模型(LLMs)可作為結構化資料處理的精密引擎。本課程介紹五種功能「基本元件」,讓開發者能將人工智慧整合至專業工作流程中。

功能路徑圖

  • 摘要將大量文字(如產品評論)濃縮為簡明扼要的摘要,同時保留關鍵資訊。
  • 推論執行自動化分析,例如情感檢測、情緒辨識,或從文本中提取特定資料點(如品牌名稱)並轉換為 JSON 格式。
  • 轉換將文字從一種形式轉換為另一種形式——包括語言翻譯、語氣調整(例如由正式轉為口語),以及資料格式轉換(例如由 JSON 轉為 HTML)。
  • 擴展利用短訊號或項目清單生成長篇內容,例如客製化的客服電子郵件。
  • 聊天機器人運用對話歷史與預設角色(系統、使用者、助理)來建立互動式、具上下文意識的助手。
大型語言模型的無狀態特性
關鍵概念:與人類不同,大型語言模型是「無狀態」的。除非您在每次 API 呼叫時手動傳回完整的對話歷史,否則它們不會記得先前的互動。這段累積的歷史被稱為上下文
main.py
TERMINALbash — 80x24
> Ready. Click "Run" to execute.
>
Question 1
A developer needs to extract the "Price" and "Discount Code" from 1,000 emails and save them to a database. Which approach and temperature setting are most appropriate?
A) Summarizing with Temperature = 0.7
B) Expanding with Temperature = 0
C) Inferring (Extracting) with Temperature = 0
D) Transforming with Temperature = 1.0
Challenge: Tone Transformer
Apply the Transforming and Chatbot role concepts.
You are building a "Tone Transformer" for a corporate helpdesk. You need to convert a frustrated user's slang-heavy complaint into a "Formal" and "Polite" summary for a manager.
Task
Specify the role of the "System" message to ensure the model acts appropriately, and write the "User" prompt to translate: 'The app is buggy as heck and I want my money back ASAP!'
System Message:
"You are a professional executive assistant. Your task is to rephrase communication into a formal, corporate-appropriate tone."

User Prompt:
"Translate the following text into a formal summary: 'The app is buggy as heck and I want my money back ASAP!'"

Expected Result:
"The customer is reporting technical instability within the application and is requesting an immediate refund."